Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NXTableValue

Adopted By:	no Enterprise Objects Framework classes

Declared In:	eointerface/NXTableProtocols.h

Protocol Description

An NXFormatter uses an object conforming to the NXTableValue protocol to represent the value it displays and edits. This protocol declares methods for accessing a value as any of a number of Objective C types.

Method Types

Getting the type	- objCType

Setting NULL values	- setNull
- isNull

Accessing values	- setDoubleValue:
- doubleValue
- setFloatValue:
- floatValue
- setIntValue:
- intValue
- setObjectValue:
- setObjectValueNoCopy:
- objectValue
- setString:
- string
- setStringValue:
- setStringValueNoCopy:
- stringValue

Instance Methods

doubleValue

- (double)doubleValue

Returns the receiver's value as a double. If the receiver's value is an object, returns the result of a doubleValue message sent to the object. Returns 0.0 if the receiver is null.

See also:  - isNull

floatValue

- (float)floatValue

Returns the receiver's value as a float. If the receiver's value is an object, returns the result of a floatValue message sent to the object. Returns 0.0 if the receiver is null.

See also:  - isNull

intValue

- (int)intValue

Returns the receiver's value as an int. If the receiver's value is an object, returns the result of a intValue message sent to the object. A floating-point value is cast to int, not rounded in any special manner. Returns 0 if the receiver is null.

See also:  - isNull

isNull

- (BOOL)isNull

Returns YES if the receiver was last set to a null value with setNull, NO if it was last set to any other kind of value. A null NXTableValue returns 0 or nil when asked for its value, and doesn't have a valid Objective C type.

objCType

- (const char *)objCType

Returns the Objective C type that the receiver was last set as. If the object is null the return value is undefined.

Set Message	Objective C Type

setDoubleValue:	f
setFloatValue:	d
setIntValue:	i
setObjectValue:	@
setStringValue:	*
setStringValueNoCopy:	*
setString:	*

See also:  - isNull

objectValue

- objectValue

Returns the receiver's object value, or nil is the receiver wasn't last set as an object.

setDoubleValue:

- setDoubleValue:(double)aDouble

Set the receiver's value as aDouble and records its Objective C type as ªdº. If the receiver's last value was set with setObjectValue:, sends free to the object.

See also:  - setObjectValueNoCopy:

setFloatValue:

- setFloatValue:(float)aFloat

Set the receiver's value as aFloat and records its Objective C type as ªfº. If the receiver's last value was set with setObjectValue:, sends free to the object.

See also:  - setObjectValueNoCopy:

setIntValue:

- setIntValue:(int)anInt

Set the receiver's value as anInt and records its Objective C type as ªiº. If the receiver's last value was set with setObjectValue:, sends free to the object.

See also:  - setObjectValueNoCopy:

setNull

- setNull

Set the receiver's value to nothing. Doesn't reset its Objective C type. If the receiver's last value was set with setObjectValue:, sends free to the old object value.

See also:  - setObjectValueNoCopy:

setObjectValue:

- setObjectValue:anObject

Set the receiver's value to a copy of anObject and records its Objective C type as ª*º. If the receiver's last value was set with setObjectValue:, sends free to the old object value.

See also:  - setObjectValueNoCopy:

setObjectValueNoCopy:

- setObjectValueNoCopy:anObject

Set the receiver's value to anObject and records its Objective C type as ª*º. Doesn't retain anObject. If the receiver's last value was set with setObjectValue:, sends free to the old object value.

See also:  - setObjectValueNoCopy:

setString:

- (void)setString:aStringObject

Set the receiver's value as the C string value of the aStringObject (by sending the object a stringValue message) and records its Objective C type as ª*º. Doesn't retain anObject. If the receiver's last value was set with setObjectValue:, sends free to the object value.

See also:  - setObjectValueNoCopy:

setStringValue:

- setStringValue:(const char *)aCString

Set the receiver's value as aString and records its Objective C type as ª*º. Doesn't retain anObject. If the receiver's last value was set with setObjectValue:, sends free to the object value.

See also:  - setObjectValueNoCopy:

setStringValueNoCopy:

- setStringValueNoCopy:(const char *)aCString

Set the receiver's value as aString and records its Objective C type as ª*º. Doesn't retain anObject. If the receiver's last value was set with setObjectValue:, sends free to the object value.

See also:  - setObjectValueNoCopy:

string

- string

Returns the receiver's value as an NSString created from the return value of the receiver's stringValue message.

stringValue

- (const char *)stringValue

Returns the receiver's value as a C string. If the receiver's value is an object, gets the C string value by sending the object a stringValue message. Returns NULL if the receiver is null.

See also:  - isNull